home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / print / isigns50.zip / CONST.PAS < prev    next >
Pascal/Delphi Source File  |  1989-10-01  |  4KB  |  100 lines

  1. CONST
  2.            Date = 'v5.0, 1 Oct 89'; {last revision of this program}
  3.      Max_Length = 3264;    {max number of characters or dots in a output line}
  4.                            {Epson: 240 dpi * 13.6in/line}
  5.                            {HP: 300dpi * 8in/line = 2400}
  6.       Max_Width = 150;     {of a character in dots}
  7.      Max_Height = 150;     {of a character in dots}
  8. Max_Width_Bytes = TRUNC(0.99+Max_Width/8);  {width of character in bytes}
  9.  
  10. {default problem parameters - TurboPascal Initialized 'Constants'}
  11.     sign_type : (sign,banner)              = sign;      {type of sign}
  12.    block_type : (letter,block,overstrike,bit)  = letter; {output type}
  13.    block_char : CHAR                       = #177;      {square block}
  14.      os_strng : STRING[5]                  = '*XO';     {overstrike string}
  15.       font_fn : STRING[14]                 = 'Font.fnt';{font filename}
  16.      font_fni : STRING[14]                 = 'Font.fnx';{font index filename}
  17.        mult_w : INTEGER                    = 1;         {height multiplier}
  18.        mult_h : INTEGER                    = 1;         {width multiplier}
  19.     inv_video : BOOLEAN                    = FALSE;     {inverse b/w?}
  20.     centering : BOOLEAN                    = TRUE;      {should center output?}
  21.  given_offset : INTEGER                    = 0;         {left margin}
  22.   given_width : INTEGER                    = 0;         {width of output}
  23.  input_device : (keyboard,text_file)       = keyboard;  {input from where?}
  24.         in_fn : STRING[14]                 = 'Signs.in'; {input filename}
  25. output_device : (screen,printr,recd_file)  = screen;    {output to?}
  26.   device_size : (wide,normal)              = normal;    {is it wide?}
  27.    num_copies : INTEGER                    = 1;         {multiple copies?}
  28.      prt_type : (epson,ids,hp,dumb)        = epson;     {what type of prt?}
  29.       prt_cpi : (pica,elite,squeezed,tiny) = squeezed;  {chars/inch}
  30.       prt_lpi : (six,eight,ten,twelve)     = twelve;    {lines/inch}
  31.     prt_color : (black,red,green,blue)     = black;     {color}
  32.  graphic_dens : (single,double,triple,quad)= single;    {for bit output}
  33.        out_fn : STRING[14]                 = 'Signs.out';  {output filename}
  34.  
  35.    font_width : INTEGER                    = 0;
  36.   font_height : INTEGER                    = 0;         {size of font in use}
  37.       ff_open : BOOLEAN                    = FALSE;     {is ff open and ok?}
  38.  
  39. TYPE
  40.     CHAR_INDEX_RECORD = RECORD {points to char in soft font file}
  41.     character : CHAR;          {the character}
  42.      position : WORD;          {where found in font file?}
  43.    top_offset : INTEGER;       {how far down does character start}
  44.   left_offset : INTEGER;       {how far left does character start}
  45.         width : INTEGER;       {how wide is it}
  46.        height : INTEGER;       {how high}
  47.       delta_x : INTEGER;       {how far should 'cursor' move?}
  48.     END; {record}
  49.  
  50.     PTR_CHAR_MAP_8 = ^CHAR_MAP_8;
  51.     CHAR_MAP_8 = RECORD
  52.         next : PTR_CHAR_MAP_8;
  53.         back : PTR_CHAR_MAP_8;
  54.          map : ARRAY[1..56,1..7] OF BYTE;
  55.     END; {record}
  56.  
  57.     PTR_CHAR_MAP_12 = ^CHAR_MAP_12;
  58.     CHAR_MAP_12 = RECORD
  59.         next : PTR_CHAR_MAP_12;
  60.         back : PTR_CHAR_MAP_12;
  61.          map : ARRAY[1..80,1..10] OF BYTE;
  62.     END; {record}
  63.  
  64.     PTR_CHAR_MAP_18 = ^CHAR_MAP_18;
  65.     CHAR_MAP_18 = RECORD
  66.         next : PTR_CHAR_MAP_18;
  67.         back : PTR_CHAR_MAP_18;
  68.          map : ARRAY[1..104,1..13] OF BYTE;
  69.     END; {record}
  70.  
  71.     PTR_CHAR_MAP_24 = ^CHAR_MAP_24;
  72.     CHAR_MAP_24 = RECORD
  73.         next : PTR_CHAR_MAP_24;
  74.         back : PTR_CHAR_MAP_24;
  75.          map : ARRAY[1..128,1..16] OF BYTE;
  76.     END; {record}
  77.  
  78.     PTR_CHAR_MAP_30 = ^CHAR_MAP_30;
  79.     CHAR_MAP_30 = RECORD
  80.         next : PTR_CHAR_MAP_30;
  81.         back : PTR_CHAR_MAP_30;
  82.          map : ARRAY[1..160,1..20] OF BYTE;
  83.     END; {record}
  84.  
  85.     OUT_LINE_REC = RECORD
  86.         len : INTEGER;
  87.         chr : ARRAY[1..Max_Length] OF CHAR;
  88.        ichr : ARRAY[1..Max_Length] OF CHAR;
  89.     END; {record}
  90.  
  91.     OUT_GRAPHIC_REC = RECORD
  92.         len : INTEGER;
  93.         chr : ARRAY[1..Max_Length] OF CHAR;
  94.     END; {record}
  95.  
  96.        S255 = STRING[255];  {for input}
  97.         S14 = STRING[14];   {for filenames}
  98.          S2 = STRING[2];    {for Hex input}
  99.  
  100.